package com.etc.medical.client;

import com.etc.common.entity.BasicPatient;
import com.etc.common.utils.Result;
import com.etc.medical.breaker.BasicPatientBreak;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "sp-patient-basic",fallback = BasicPatientBreak.class)
public interface BasicPatientClient {
    /**
     * 查询医生Id下的所有病人信息
     *
     * @return
     */
    @RequestMapping("/patient/queryByDocId")
    Result queryDocId(@RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize, @RequestParam("docId") String docId);


    /**
     * 新增病人信息
     *
     * @return
     */
    @RequestMapping(value = "/patient/insert",method = RequestMethod.POST)
    Result insert(BasicPatient basicPatient, @RequestParam("docId") String docId);

    /**
     * 修改病人信息
     *
     * @return
     */
    @RequestMapping(value = "/patient/update",method = RequestMethod.POST)
    Result update(BasicPatient basicPatient, @RequestParam("operatorId") String operatorId);

    /**
     * 批量结束病人治疗
     *
     * @param ids
     * @param operatorId
     * @return
     */
    @RequestMapping(value = "/patient/endPatient",method = RequestMethod.POST)
    Result endPatient(@RequestParam("ids") String[] ids, @RequestParam("operatorId") String operatorId);
}
